Electronic apparatus and method for controlling thereof

ABSTRACT

A method for controlling an electronic apparatus is provided. The method for controlling an electronic apparatus includes the steps of selecting a generic-purpose artificial intelligence model, generating a compressed artificial intelligence model based on the selected generic-purpose artificial intelligence model, and generating a dedicated artificial intelligence model based on the generated compressed artificial intelligence model, and the step of generating a compressed artificial intelligence model includes the steps of acquiring a rank of a singular value decomposition (SVD) algorithm based on a compression rate, compressing and training the selected generic-purpose artificial intelligence model based on the acquired rank and converting the model into the compressed artificial intelligence model, determining the performance of the converted compressed artificial intelligence model based on a predetermined first threshold value, and based on the performance of the converted compressed artificial intelligence model being lower than the predetermined first threshold value, generating the dedicated artificial intelligence model.

CROSS-REFERENCE TO RELATED APPLICATION(S)

This application is a bypass continuation application of InternationalApplication PCT/KR2021/001752 filed on Feb. 9, 2021, which claimspriority to Korean Patent Application No. 10-2020-0055341, filed on May8, 2021, in the Korean Intellectual Property Office, the disclosures ofwhich are incorporated herein in their entireties by reference.

TECHNICAL FIELD

The disclosure relates to an electronic apparatus and a method forcontrolling thereof, and more particularly, to an electronic apparatusincluding an artificial intelligence model, and a method for controllingthereof.

BACKGROUND ART

Artificial intelligence systems implementing intelligence of a humanlevel are being developed. An artificial intelligence system is a systemwherein a machine learns and determines by itself, unlike conventionalrule-based systems. Artificial intelligence systems are being utilizedin various ranges such as voice recognition, image recognition, andfuture prediction, etc.

In particular, an artificial intelligence system that solves a givenproblem through a deep neural network based on deep learning is beingdeveloped.

A deep neural network is a neural network that includes a plurality ofhidden layers between an input layer and an output layer, and is used toprovide a model that implements artificial intelligence technologiesthrough neurons included in each layer.

In general, a deep neural network may include a plurality of neurons (ornodes) for deriving a correct result value.

In case where a vast amount of neurons exist, there is a problem that alot of time is spent on an operation for deriving an output value,although accuracy of an output value for an input value becomes high.

DISCLOSURE OF INVENTION Technical Problem

Provided is an electronic apparatus that generates a compressedartificial intelligence model based on an artificial intelligence modelincluded in the electronic apparatus, and performs an operation for aninput value by using the generated compressed artificial intelligencemodel, and thereby utilizes resources effectively.

Solution to Problem

A method for controlling an electronic apparatus according to anembodiment of the disclosure includes the steps of selecting ageneric-purpose artificial intelligence model, generating a compressedartificial intelligence model based on the selected generic-purposeartificial intelligence model, and generating a dedicated artificialintelligence model based on the generated compressed artificialintelligence model, and the step of generating a compressed artificialintelligence model includes the steps of acquiring a rank of a singularvalue decomposition (SVD) algorithm based on a compression rate,compressing and training the selected generic-purpose artificialintelligence model based on the acquired rank and converting the modelinto the compressed artificial intelligence model, determining theperformance of the converted compressed artificial intelligence modelbased on a predetermined first threshold value, and based on theperformance of the converted compressed artificial intelligence modelbeing lower than the predetermined first threshold value, generating thededicated artificial intelligence model.

Meanwhile, an electronic apparatus according to another embodiment ofthe disclosure includes a memory storing first learning data and ageneric-purpose artificial intelligence model trained by the firstlearning data, and a processor, wherein the processor is configured toselect the trained generic-purpose artificial intelligence model,acquire a rank of a singular value decomposition (SVD) algorithm basedon a compression rate, compress and train the selected generic-purposeartificial intelligence model based on the acquired rank and convert themodel into the compressed artificial intelligence model, determine theperformance of the converted compressed artificial intelligence modelbased on a predetermined first threshold value, and based on theperformance of the converted compressed artificial intelligence modelbeing lower than the predetermined first threshold value, generate adedicated artificial intelligence model.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 is a schematic diagram of a process of an electronic apparatusgenerating artificial intelligence models in various sizes from oneartificial intelligence model according to an embodiment;

FIG. 2 is a block diagram showing a configuration of an electronicapparatus according to various embodiments;

FIG. 3A is a diagram showing compression of an artificial intelligencemodel using an SVD algorithm according to an embodiment;

FIG. 3B is a diagram showing compression of an artificial intelligencemodel using an SVD algorithm according to an embodiment;

FIG. 4 is a flow chart of an operation of an electronic apparatusaccording to an embodiment;

FIG. 5 is a diagram showing a learning data set reconstituted fromlearning data and a plurality of dedicated artificial intelligencemodels generated from one artificial intelligence model according to anembodiment;

FIG. 6 is a diagram showing information on a dedicated artificialintelligence model and information on a learning data set stored in amemory according to an embodiment;

FIG. 7A is a flow chart of an operation of a dedicated artificialintelligence model according to an embodiment;

FIG. 7B is a flow chart of an operation of a dedicated artificialintelligence model according to an embodiment;

FIG. 8 is a diagram showing a process of generating a plurality ofdedicated artificial intelligence models from an artificial intelligencemodel according to an embodiment;

FIG. 9A is a diagram showing an operation of training a dedicatedartificial intelligence model by using target data according to anembodiment;

FIG. 9B is a diagram showing an operation of training a dedicatedartificial intelligence model by using target data according to anembodiment;

FIG. 10 is a diagram showing an operation of training a dedicatedartificial intelligence model based on test data according to anembodiment;

FIG. 11 is a diagram showing an operation of training a dedicatedartificial intelligence model based on a user's input according to anembodiment; and

FIG. 12 is a flow chart of a method for controlling an electronicapparatus according to various embodiments.

MODE FOR THE INVENTION

Hereinafter, various example embodiments will be described withreference to the accompanying drawings. However, it should be noted thatthe various example embodiments are not for limiting the technologydescribed in the disclosure to a specific embodiment, but they should beinterpreted to include various modifications, equivalents, and/oralternatives of the embodiments of the disclosure. Also, with respect tothe detailed description of the drawings, similar components may bedesignated by similar reference numerals.

In addition, expressions such as “have,” “may have,” “include,” and “mayinclude” denote the existence of such characteristics (e.g.: elementssuch as numbers, functions, operations, and components), and do notexclude the existence of additional characteristics.

Also, the expressions “A or B,” “at least one of A and B,” “at least oneof A or B,” “one or more of A and B,” or “one or more of A or B” and thelike may include all possible combinations of the listed items. Forexample, “A or B,” “at least one of A and B,” or “at least one of A orB” may refer to all of the following cases: (1) including at least oneA, (2) including at least one B, or (3) including at least one A and atleast one B.

In addition, the expressions “first,” “second,” and the like maydescribe various elements regardless of any order and/or degree ofimportance. Also, such expressions are used only to distinguish oneelement from another element, and are not intended to limit theelements.

The description that one element (e.g.: a first element) is“(operatively or communicatively) coupled with/to” or “connected to”another element (e.g.: a second element) should be interpreted toinclude both the case where the one element is directly coupled to theanother element, and the case where the one element is coupled to theanother element through still another element (e.g.: a third element).In contrast, the description that one element (e.g.: a first element) is“directly coupled” or “directly connected” to another element (e.g.: asecond element) can be interpreted to mean that still another element(e.g.: a third element) does not exist between the one element and theanother element.

The expression “configured to” may be interchangeably used with otherexpressions such as “suitable for,” “having the capacity to,” “designedto,” “adapted to,” “made to,” and “capable of,” depending on cases. Theterm “configured to” does not necessarily mean that an apparatus is“specifically designed to” in terms of hardware. Instead, under somecircumstances, the expression “an apparatus configured to” may mean thatthe apparatus “is capable of” performing an operation together withanother apparatus or component. For example, the phrase “a sub-processorconfigured to perform A, B, and C” may mean a dedicated processor (e.g.:an embedded processor) for performing the corresponding operations, or ageneric-purpose processor (e.g.: a central processing unit (CPU) or anapplication processor) that can perform the corresponding operations byexecuting one or more software programs stored in a memory device.

Also, the term user may refer to a person using an electronic apparatusor an apparatus using an electronic apparatus (e.g.: an artificialintelligence electronic apparatus).

The electronic apparatus may include an artificial intelligence learningmodel.

Hereinafter, the disclosure will be described in detail with referenceto the drawings.

FIG. 1 is a schematic diagram of a process of an electronic apparatusgenerating artificial intelligence models in various sizes from oneartificial intelligence model according to an embodiment.

An electronic apparatus according to the various embodiments may be anapparatus that provides output data for input data by using anartificial intelligence model (or an artificial neural network model).

An electronic apparatus according to the various embodiments mayinclude, for example, at least one of a smartphone, a tablet PC, amobile phone, a video phone, an e-book reader, a desktop PC, a laptopPC, a netbook computer, a workstation, a server, a PDA, a portablemultimedia player (PMP), an MP3 player, a kiosk, a medical device, acamera, or a wearable device. A wearable device may include at least oneof an accessory-type device (e.g.: a watch, a ring, a bracelet, an anklebracelet, a necklace, glasses, a contact lens, or a head-mounted-device(HMD)), a device integrated with fabrics or clothing (e.g.: electronicclothing), a body-attached device (e.g.: a skin pad), or an implantablecircuit. Also, in some embodiments, an electronic apparatus may include,for example, at least one of a television, a digital video disk (DVD)player, an audio, a refrigerator, an air conditioner, a cleaner, anoven, a microwave oven, a washing machine, an air purifier, a set topbox, a home automation control panel, a security control panel, a mediabox, a game console, an electronic dictionary, an electronic key, acamcorder, or an electronic photo frame. However, the disclosure is notlimited thereto, and an electronic apparatus can be any apparatus thatcan perform an operation of a neural network model.

An artificial intelligence model may be an artificial intelligence modelincluding an artificial neural network trained through machine learningor deep learning. An artificial intelligence model may consist of aplurality of neural network layers. Each of the plurality of neuralnetwork layers may have a plurality of weight values, and may perform aneural network operation through an operation between the operationresult of the previous layer and the plurality of weight values. Theplurality of weight values that the plurality of neural network layershave may be optimized by a learning result of an artificial intelligencemodel. For example, the plurality of weight values may be updated suchthat a loss value or a cost value acquired from an artificialintelligence model during a learning process is reduced or minimized. Anartificial neural network may include a deep neural network (DNN), andthere are, for example, a convolutional neural network (CNN), a deepneural network (DNN), a recurrent neural network (RNN), a restrictedBoltzmann Machine (RBM), a deep belief network (DBN), a bidirectionalrecurrent deep neural network (BRDNN), or deep Q-networks, etc., but thedisclosure is not limited to the aforementioned examples.

One artificial intelligence model may be stored in an electronicapparatus in operation S110. The artificial intelligence model may be ageneric-purpose artificial intelligence model 10 trained by variouslearning data. Also, the generic-purpose artificial intelligence model10 may be a model trained at the electronic apparatus, and it may alsobe a model trained at an external server and stored in the electronicapparatus.

The generic-purpose artificial intelligence model 10 may be anartificial intelligence model trained by various kinds of learning dataso that it can be used in various apparatuses or various environments.That is, the generic-purpose artificial intelligence model 10 may be anartificial intelligence model trained to perform various operations froma simple operation to a complex operation. For example, in a voicerecognition technology, a generic-purpose artificial intelligence modelmay refer to a model trained to receive input of not only voice data fora simple control command in a speaker, a refrigerator, and an airconditioner, but also voice data for a command such as inference,search, and recommendation in a smartphone and provide output data forthe voice data. For example, in an object recognition technology, ageneric-purpose artificial intelligence model may refer to a modeltrained to not only simply recognize an object, but also understand aspace or an atmosphere through an object. These are merely embodiments,and sizes or shapes of generic-purpose artificial intelligence modelsmay be diverse according to technical fields or learning data.

As the generic-purpose artificial intelligence model 10 is trained byusing various data, it has an advantage that it can provide outputvalues for various input values, but there are problems that its size isbig and a lot of resources (e.g., a memory, a CPU, a GPU, etc.) areconsumed when it performs an operation for an input value. Accordingly,the electronic apparatus may generate compressed artificial intelligencemodels 20, 30 in various sizes that are smaller than the generic-purposeartificial intelligence model 10, and which maintain the same or similarperformance as the generic-purpose artificial intelligence model.

As such, the electronic apparatus may compress the artificialintelligence model in operation S120. Specifically, the electronicapparatus may repetitively compress the generic-purpose artificialintelligence model 10 and generate compressed artificial intelligencemodels such as an A dedicated artificial intelligence model 20 or a Bdedicated artificial intelligence model 30.

A dedicated artificial intelligence model corresponds to ageneric-purpose artificial intelligence model, and it refers to anartificial intelligence model trained to be used in a specific apparatusor environment. For example, in a voice recognition technology, thededicated artificial intelligence model may be an artificialintelligence model trained to receive voice data for a simple controlcommand in an air conditioner as input data and provide output data, orit may be an artificial intelligence model trained to receive voice datauttered in a quiet environment as input data and provide output data.

Compressing an artificial intelligence model means reducing the size ofan artificial neural network included in the artificial intelligencemodel, and specifically, it means reducing the size of data related toconnections among a plurality of nodes (connections of weight values)included in layers of an artificial neural network. For example, in acase where a first layer and a second layer in an artificialintelligence model respectively include four nodes and 16 connectionsexist between the first layer and the second layer, the electronicapparatus may compress the artificial intelligence model by adding athird layer having one node between the first layer and the second layerand reducing the connections between the first layer and the secondlayer to eight (four between the first layer and the third layer, andfour between the third layer and the second layer). Alternatively, theelectronic apparatus may compress the artificial intelligence model byreducing the number of nodes included in the first layer or the secondlayer. Alternatively, according to another embodiment, the electronicapparatus may compress the artificial intelligence model by reducing thenumber of bits of data indicating the connections among the plurality ofnodes included in the artificial intelligence model. However, thedisclosure is not limited to the aforementioned examples, and theelectronic apparatus may compress the artificial intelligence model byreducing the size of data related to the connections among the pluralityof nodes included in the neural network by various methods. A specificcompression process of an artificial intelligence model according to anembodiment will be described in detail in FIG. 2.

The electronic apparatus may repetitively compress the generic-purposeartificial intelligence model 10 based on the performance of anartificial intelligence model compressed based on the generic-purposeartificial intelligence model 10. Performance of an artificialintelligence model indicates the number of cases wherein an output valuefor an input value coincides with a target value or close to a targetvalue as a result of testing a trained artificial intelligence model.

After compressing the generic-purpose artificial intelligence model 10,the electronic apparatus may train and test the compressed artificialintelligence model. The electronic apparatus may repetitively compressthe artificial intelligence model until the performance of the trainedartificial intelligence model is within a predetermined range. Forexample, the electronic apparatus may repetitively compress theartificial intelligence model until the performance of the artificialintelligence model compressed based on the generic-purpose artificialintelligence model becomes 79% or higher and 82% or lower. This ismerely an embodiment, and the electronic apparatus may repetitivelycompress the artificial intelligence model until the performance of theartificial intelligence model becomes a predetermined threshold value(e.g., 82%) or lower.

After compressing the artificial intelligence model until theperformance of the compressed artificial intelligence model becomes apredetermined performance, the electronic apparatus may reconstitute alearning data set in operation S120.

Specifically, the electronic apparatus may additionally compress thecompressed artificial intelligence model after the performance of thecompressed artificial intelligence model reaches within a predeterminedrange (or a predetermined threshold value or lower) by a compressionprocess, and here, a learning data set may be reconstituted forimproving the performance of the additionally compressed artificialintelligence model.

More specifically, the electronic apparatus may classify learning datathat trained the generic-purpose artificial intelligence model 10 into aplurality of data sets based on a predetermined rule, and select atleast one data set among the plurality of classified data sets andreconstitute the learning data set. Reconstruction of a learning dataset will be described in detail in FIG. 2.

The electronic apparatus 100 may train the additionally compressedartificial intelligence model by using the learning data setreconstituted from the learning data according to the predeterminedrule. Here, as the additionally compressed artificial intelligence modelis trained by a learning data set corresponding to some of the learningdata that trained the generic-purpose artificial intelligence model, itmay be a dedicated artificial intelligence model 20, 30. For example, anartificial intelligence model trained by using the reconstitutedlearning data set A may be the A dedicated artificial intelligence model20.

For example, if, in a voice recognition technology, learning data wasvoice data used in a smartphone, and a generic-purpose artificialintelligence model was a smartphone-based voice recognition model, areconstituted learning data set may be voice data used in a TV selectedin the initial learning data, and an artificial intelligence modeltrained by the reconstituted learning data set may be a TV-based voicerecognition model.

Since a dedicated artificial intelligence model may be a compressedgeneric-purpose artificial intelligence model, it may have a smallersize than a generic-purpose artificial intelligence model. Inparticular, the size of data related to connections among a plurality ofnodes included in a dedicated artificial intelligence model may besmaller than the size of data related to connections among a pluralityof nodes included in a generic-purpose artificial intelligence model.

The electronic apparatus 100 may store the A dedicated artificialintelligence model 20 in the electronic apparatus in operation S110.

The electronic apparatus 100 may continuously compress and train the Adedicated artificial intelligence model 20 while checking theperformance of the A dedicated artificial intelligence model 20. In casethe performance of the A dedicated artificial intelligence model 20satisfies a predetermined condition, the electronic apparatus mayreconstitute a data set from the learning data based on thepredetermined rule again and generate a data set B, and train the Bdedicated artificial intelligence model 30 by using the data set B.Also, the electronic apparatus may store the trained B dedicatedartificial intelligence model 30 in the electronic apparatus. Asexplanation in this regard will overlap with the compression of ageneric-purpose artificial intelligence model and reconstitution of adata set described above, detailed explanation will be omitted.

As described above, the electronic apparatus 100 may repetitivelyperform compression of an initial generic-purpose artificialintelligence model and reconstitution of a learning data set, andgenerate one or more dedicated artificial intelligence models of varioussizes and uses. Since the generated artificial intelligence models invarious sizes may be trained by a data set selected according to apredetermined rule, they may exert a performance of a specific level.

FIG. 2 is a diagram for illustrating a configuration of an electronicapparatus according to various embodiments. Referring to FIG. 2, theelectronic apparatus 100 may include a memory 110 and a processor 120.Functions related to artificial intelligence may be operated through theprocessor 120 and the memory 110.

The memory 110 is a component for storing an operating system (OS) forcontrolling the overall operations of the components of the electronicapparatus 100 and at least one instruction or data related to thecomponents of the electronic apparatus 100. An instruction means oneaction statement that can be directly executed by the processor 120 in aprogramming drafting language, and it is a minimum unit for execution oroperation of a program.

The processor 120 may perform operations according to variousembodiments that will be described below by executing at least oneinstruction stored in the memory 110.

The memory 110 is a component for storing various kinds of programs anddata, etc. necessary for the operations of the electronic apparatus 100.The memory 110 may be implemented as a non-volatile memory, a volatilememory, a flash-memory, a hard disk drive (HDD) or a solid state drive(SSD), etc. Also, the memory 110 may be accessed by the processor 120,and reading/recording/correcting/deleting/updating, etc. of data by theprocessor 120 may be performed. The term memory may include the memory110, a ROM and a RAM inside the processor 120, or a memory card mountedon the electronic apparatus 100 (e.g., a micro SD card, a memory stick).

In the memory 110, information on an artificial intelligence modelincluding a plurality of layers may be stored. Here, the artificialintelligence model stored in the memory 110 may be a generic-purposeartificial intelligence model, or it may be a dedicated artificialintelligence model that compressed a generic-purpose artificialintelligence model. Specifically, in the memory 110, information on ageneric-purpose artificial intelligence model, a dedicated artificialintelligence model, or a compression parameter of a dedicated artificialintelligence model, etc. may be stored.

Also, in the memory 110, learning data that trains a generic-purposeartificial intelligence model may be stored. Specifically, in the memory110, information on a learning data set that trained a dedicatedartificial intelligence model may be stored. Here, the learning data setand the information on the dedicated artificial intelligence modeltrained by the learning data set may be stored in the memory 110 in acorresponding manner.

In addition, in the memory 110, a rule for selecting a learning data setto train a dedicated artificial intelligence model in learning data maybe stored.

Further, in the memory 110, an artificial intelligence model compressionmodule 111 for compressing an artificial intelligence model and alearning data reconstitution module 112 for reconstituting learning dataaccording to compression of an artificial intelligence model may bestored.

The artificial intelligence model compression module 111 may compress ageneric-purpose artificial intelligence model or a dedicated artificialintelligence model stored in the memory 110 and generate anotherdedicated artificial intelligence model, and provide the model.

Specifically, the artificial intelligence model compression module 111may generate a dedicated artificial intelligence model by compressing anartificial intelligence model by using a data compression algorithm.Here, the artificial intelligence model compression module 111 may applydifferent compression algorithms to each layer of an artificialintelligence model.

The artificial intelligence model compression module 111 may compress anartificial intelligence model by using data compression algorithms suchas a low rank approximation algorithm like matrix factorization,non-negative matrix factorization, singular value decomposition, andeigen value decomposition, a pruning algorithm, and a quantizationalgorithm.

An SVD algorithm is an algorithm that decomposes a matrix into aspecific structure and thereby reduces the size of the matrix. An SVDalgorithm may decompose a matrix M by expressing the matrix M as amultiplication of matrices U, Σ, and V*as below in Equation 1.

M=UΣV*  [Equation 1]

In Equation 1, M is a matrix in a size of m×n, U is an orthogonal matrix(unitary matrix) in a size of m×m, V is an orthogonal matrix (unitarymatrix) in a size of n×n, and V*is a conjugate transpose matrix of V.Also, Σ is a diagonal matrix which has a size of m×n, and wherein thevalues of elements on a diagonal line are not negative numbers and thevalues of all the remaining elements are 0.

M is a matrix corresponding to weight data included in one layer of anartificial neural network, and one layer may include at least one M.

That is, the artificial intelligence model compression module 111 mayperform compression by expressing M corresponding to weight dataincluded in one layer as a multiplication of a plurality of matrices U,Σ, and V*.

In the case of using a singular value decomposition (SVD) algorithm, theartificial intelligence model compression module 111 may sequentiallycompress an artificial intelligence model while changing the value ofthe rank.

Specifically, the artificial intelligence model compression module 111may determine Σ according to the input value of the rank. Here, the rankis a parameter that determines a compression rate of an artificialintelligence model, and it indicates the number of elements havingvalues that are not 0 among the elements of Σ. The artificialintelligence model compression module 111 may make the values of theremaining elements 0 excluding only the elements in the rank number inbig sizes among values that are not negative numbers among the elementsof Σ. For example, in case the value of the rank is 64, the artificialintelligence model compression module 111 may determine Σ by making theremaining values 0 excluding only the higher 64 elements in big sizesamong the values that are not negative numbers included in Σ. Here, thesize of Σ may be 64×64.

Then, the artificial intelligence model compression module 111 maydetermine the sizes of U and V* based on the size of Σ.

FIG. 3A is a diagram for illustrating in more detail an SVD algorithmthat determines the sizes of U and V* based on the size of Σ accordingto an embodiment.

As illustrated in FIG. 3A, in case it is assumed that M is a matrix in asize of 1536×1536 and the rank is 256 (case 1), the size of Σ may be256×256, the size of U may be 1536×256, and the size of V* may be256×1536, as described above. In this case, a multiplication of thematrices U, Σ, and V* generated by the SVD algorithm has a size of(1536×256)+(256×256)+(256×1536)(=851,968), and thus the size may be asmaller size than M (1536×1536=2,359,296).

In case it is assumed that M is a matrix in a size of 1536×1536 and therank is 128 (case 2), the size of Σ may be 128×128, the size of U may be1536×128, and the size of V* may be 128×1536, as described above. Inthis case, a multiplication of the matrices U, Σ, and V* generated bythe SVD algorithm has a size of(1536×128)+(128×128)+(128×1536)(=409,600), and thus the size may be asmaller size than M (1536×1536=2,359,296).

In FIG. 3A, it was illustrated that several compression matrices aregenerated according to the rank value in the matrix M, but thedisclosure is not necessarily limited thereto.

Depending on cases, a compression matrix may be generated as the SVDalgorithm is reapplied to a compression matrix compressed by using theSVD algorithm. For example, a compression matrix of which rank value is128 may be generated as the SVD algorithm is applied to a compressionmatrix of which rank value was compressed to 256.

As described above, the artificial intelligence model compression module111 may sequentially and repetitively compress an artificialintelligence model by changing the value of the rank of the SVDalgorithm. Here, as the value of the rank becomes lower, the compressionrate becomes bigger, and thus the artificial intelligence modelcompression module 111 may sequentially and repetitively reduce the sizeof the artificial intelligence model while sequentially making the valueof the rank lower.

In FIG. 3A, only a case wherein compression is performed for one matrixM is shown, but the artificial intelligence model compression module 111may perform compression for a plurality of Ms included in one layer.

FIG. 3B is a diagram for illustrating a case wherein compression isperformed for a plurality of matrices M according to an embodiment. Asdescribed above, one layer included in an artificial intelligence modelmay include at least one M. M_(a1), M_(a2), M_(a3), M_(a4), M_(b1),M_(b2), M_(b3), and M_(b4) in FIG. 3B indicate a plurality of Msincluded in one layer of an artificial intelligence model. In FIG. 3B,description regarding Σ was omitted for the convenience of explanation.

As described above in FIG. 3A, the artificial intelligence modelcompression module 111 may compress an artificial intelligence model byapplying the SVD algorithm for one M. In this case, if it is assumedthat the value of the rank for each M of which size is 1024×1024(=8,388,608) is 256, the size of U may be 1024×256, and the size of Vmay be 256×1024. Also, the size of a layer compressed by applying theSVD (the size of Σ was omitted for the convenience of explanation) is8×(1024×256)+8×(256×1024) (=4,194,304), and thus it can be figured outthat the size was reduced more than the size of M, 1024×1024(=8,388,608).

The artificial intelligence model compression module 111 may apply theSVD algorithm by combining a plurality of matrices.

Specifically, the artificial intelligence model compression module 111may select a plurality of Ms to which the SVD algorithm will be appliedamong a plurality of Ms included in one layer based on the feature of M.

For example, the artificial intelligence model compression module 111may determine that M_(a1), M_(a2), M_(a3), and M_(a4) among M_(a1),M_(a2), M_(a3), M_(a4), M_(b1), M_(b2), M_(b3), and M_(b4) have commonfeatures, and combine M_(a1), M_(a2), M_(a3), and M_(a4) (M_(a)) andapply the SVD algorithm, and determine that M_(b1), M_(b2), M_(b3), andM_(b4) have common features, and combine M_(b1), M_(b2), M_(b3), andM_(b4) (M_(b)) and apply the SVD algorithm (case 2). In this case, theartificial intelligence model compression module 111 may apply the SVDalgorithm to each of M_(a) and M_(b) in a size of 4096×1024. In case therank for each M was set as 256, the artificial intelligence modelcompression module 111 may generate U in a size of 1024×256, and V in asize of 256×1024 for each M. In this case, the size of the compressedlayer is 2×(1024×256)+2×(256×1024) (=1,835,008), and thus it can befigured out that the size was reduced more than the original size of Mand the case of the case 1.

In the case 2, it is shown that the artificial intelligence modelcompression module 111 combined (M_(a1), M_(a2), M_(a3), and M_(a4)) and(M_(b1), M_(b2), M_(b3), and M_(b4)), but the disclosure is notnecessarily limited thereto, and the artificial intelligence modelcompression module 111 may combine a plurality of Ms in various forms.For example, the artificial intelligence model compression module 111can obviously combine M_(a1), M_(a2), M_(b1), and M_(b2) as one M, andcombine M_(a3), M_(a4), M_(b3), and M_(b4) as another M.

As another example, the artificial intelligence model compression module111 may combine all of the plurality of M_(a1), M_(a2), M_(a3), M_(a4),M_(b1), M_(b2), M_(b3), and M_(b4) (M) included in one layer and applythe SVD algorithm (case 3). In case it is assumed that the rank of theSVD algorithm is 256, the artificial intelligence model compressionmodule 111 may generate one U in a size of 4096×256 and one V in a sizeof 256×2048. In this case, the size of the compressed layer is(4096×256)+(256×2048) (=1,572,864), and thus it can be figure out thatthe size was reduced more than the original size of M, and the cases ofthe case 1 and the case 2.

As described above, the artificial intelligence model compression module111 may compress an artificial intelligence model while changing therank for one matrix M (FIG. 3A), or compress an artificial intelligencemodel while varying the sizes of a plurality of Ms combined (FIG. 3B).

The artificial intelligence model compression module 111 may determine acompression parameter for an artificial intelligence model, and compressand train the artificial intelligence model according to the determinedcompression parameter.

Specifically, the artificial intelligence model compression module 111may determine ‘a layer compression parameter’ for each layer of anartificial intelligence model, ‘a unit compression parameter’ indicatingthe compression order of each layer, ‘a compression method parameter’indicating the compression method, and ‘a compression rate parameter’indicating the compression rate. Here, ‘the layer compression parameter’may include ‘the unit compression parameter,’ and ‘the unit compressionparameter’ may include ‘the compression method parameter’ and ‘thecompression rate parameter.’ With respect to the compression rateparameter, in a low rank approximation algorithm such as matrixfactorization, non-negative matrix factorization, singular valuedecomposition, and eigen value decomposition, information for the rankor at least one M combined among a plurality of Ms included in one layermay be the compression rate parameter. In the case of a pruningalgorithm, a pruning ratio, a pruning structure, or a pruning unit maybe the compression rate parameter, and in the case of a quantizationalgorithm, a quantization method (linear, non-linear, vectorquantization, lattice quantization, etc.) or the number of quantizedbits may be the compression rate parameter.

For example, in an artificial intelligence model including n layers, incase the artificial intelligence model compression module 111 decided tocompress the artificial intelligence model by using the SVD algorithm(rank=100) with the third layer as the first rank, ‘the layercompression parameter’ may be the third layer, ‘the unit compressionparameter’ may be 1, ‘the compression method parameter’ may be the SVD,and ‘the compression rate parameter’ may be 100. Also, in case theartificial intelligence model compression module 111 decided to compressthe artificial intelligence model by using the vector quantizationalgorithm (the number of bits is 4) with the first layer as the secondrank, ‘the layer compression parameter’ may be the first layer, ‘theunit compression parameter’ may be 2, ‘the compression method parameter’may be the vector quantization, and ‘the compression rate parameter’ maybe 4. The disclosure is not necessarily limited thereto, and types andvalues of parameters may be diverse depending on embodiments.

It is described above that the layer compression parameter, the unitcompression parameter, the compression method parameter, and thecompression rate parameter are layered structures, but the disclosure isnot necessarily limited thereto, and each parameter may be parallel dataas separate parameters.

The artificial intelligence model compression module 111 may performcompression for an artificial intelligence model, and then train thegenerated artificial intelligence model. Specifically, the artificialintelligence model compression module 111 may train a compressedartificial intelligence model by using learning data or a learning dataset reconstituted from the learning data.

Then, the artificial intelligence model compression module 111 maydetermine whether to additionally compress the artificial intelligencemodel. Specifically, the artificial intelligence model compressionmodule 111 may test the artificial intelligence model trained by usingtest data and determine the performance of the artificial intelligencemodel, and determine whether to additionally compress the artificialintelligence model.

For example, in a case where the performance of the compressedartificial intelligence model is higher than or equal to a predeterminedvalue (e.g., a second threshold value), the artificial intelligencemodel compression module 111 may additionally perform compression forthe artificial intelligence model.

However, in case the performance of the compressed artificialintelligence model is higher than or equal to a first threshold valueand lower than or equal to a second threshold value, the artificialintelligence model compression module 111 may stop compression for theartificial intelligence model. The standard for performance of anartificial intelligence model is merely an embodiment, and theartificial intelligence model compression module 111 may stopcompression for an artificial intelligence model in a case where theperformance of the artificial intelligence model is lower than or equalto the predetermined value.

The learning data reconstitution module 112 may reconstitute learningdata. Specifically, the learning data reconstitution module 112 may be amodule for reconstituting learning data in a case where performance foran artificial intelligence model became lower than or equal to athreshold value and compression for the artificial intelligence modelwas stopped.

The learning data reconstitution module 112 may reconstitute learningdata by using a prestored rule. Here, the rule means a rule for aninitial artificial intelligence model or a compressed artificialintelligence model to extract specific data from learning data that itlearned.

As an example of the rule, the learning data reconstitution module 112may extract feature information of learning data, and classify thelearning data into a plurality of learning data sets based on theextracted feature information. Here, the feature information of thelearning data means the feature vectors of the learning data, andspecifically, it may mean indicating elements having a specific patternor rule among a plurality of elements included in the learning data asvectors.

Then, the learning data reconstitution module 112 may reconstitute thelearning data by selecting at least one learning data set among theplurality of classified learning data sets. The learning datareconstitution module 112 may reconstitute the learning data byselecting a plurality of learning data sets of which feature vectorvalues are adjacent. However, this is merely an embodiment, and aplurality of learning data sets may be combined according to variousstandards. For example, the learning data reconstitution module 112 mayreconstitute the learning data by selecting learning data setscorresponding to target data input as an input value of an operation (orinference) into the electronic apparatus 100.

As another example of the rule, the learning data reconstitution module112 may reconstitute the learning data sets based on a result of testingthe artificial intelligence model compressed by using test data. Here,the test data indicates data which has common feature information withthe learning data, but which is different data from the learning data.

Specifically, the learning data reconstitution module 112 may classifythe test data into a plurality of test data sets based on a result thatthe artificial intelligence model compression module 111 tested theartificial intelligence model for determining the performance of theartificial intelligence model. For example, based on whether theartificial intelligence model output a target value as a result valuefor an input value, the learning data reconstitution module 112 mayclassify the test data sets into a test data set that output the targetvalue, a test data set adjacent to the target value, and a test data setthat did not reach the target value.

The learning data reconstitution module 112 may reconstitute thelearning data by using the test data set that output the target valueand the test data set adjacent to the target value, excluding the testdata set that did not reach the target value. Specifically, the learningdata reconstitution module 112 may reconstitute the learning data setsby selecting learning data sets corresponding to the test data set thatoutput the target value and the test data set adjacent to the targetvalue in the learning data.

As still another example of the rule, the learning data reconstitutionmodule 112 may reconstitute the learning data sets based on a user'sinput. The electronic apparatus 100 may receive learning data settinginformation from a user, and the learning data reconstitution module 112may reconstitute the learning data sets by using the learning datasetting information received from a user.

For example, in a case where a user who wants a ‘machine translation ata messenger’ service and inputs ‘machine translation for a messenger’ aslearning data setting information, the learning data reconstitutionmodule 112 may reconstitute the learning data sets by selecting learningdata for machine translating a term or a short sentence used in amessenger.

As described above, the learning data reconstitution module 112 mayreconstitute learning data by using a prestored rule.

The processor 120 may be electronically connected with the memory 110and control the overall operations and functions of the electronicapparatus 100. For example, the processor 120 may operate an operatingsystem or an application program and control hardware or softwarecomponents connected to the processor 120, and perform various kinds ofdata processing and operations. Also, the processor 120 may loadinstructions or data received from at least one of other components on avolatile memory and process them, and store various data in anon-volatile memory.

For this, the processor 120 may be implemented as a generic-purposeprocessor (e.g.: a central processing unit (CPU) or an applicationprocessor) that can perform operations by executing a dedicatedprocessor (e.g., an embedded processor) or one or more software programsstored in a memory device for performing the operations.

The processor may consist of one or a plurality of processors. The oneor plurality of processors may be generic-purpose processors such as acentral processing unit (CPU), an application processor (AP), a digitalsignal processor (DSP), etc., graphics-dedicated processors such as agraphics-processing unit (GPU) and a vision processing unit (VPU), orartificial intelligence-dedicated processors such as a numericprocessing unit (NPU).

The processor 120 may be implemented as a digital signal processor (DSP)processing digital signals, a microprocessor, and a time controller(T-CON). However, the disclosure is not limited thereto, and theprocessor 120 may include one or more of a central processing unit(CPU), a micro controller unit (MCU), a micro processing unit (MPU), acontroller, an application processor (AP), a graphics-processing unit(GPU) or a communication processor (CP), and an ARM processor, or may bedefined by the terms. Also, the processor 120 may be implemented as asystem on chip (SoC) having a processing algorithm stored therein orlarge scale integration (LSI), or in the form of a field programmablegate array (FPGA).

The one or plurality of processors may perform control such that inputdata is processed according to a predefined operation rule or anartificial intelligence model stored in the memory 110. Alternatively,in case the one or plurality of processors are artificialintelligence-dedicated processors, the artificial intelligence-dedicatedprocessors may be designed as a hardware structure specified forprocessing of a specific artificial intelligence model.

A predefined operation rule or an artificial intelligence model ischaracterized in that it is made through learning. Being made throughlearning may mean that a basic artificial intelligence model is trainedby using a plurality of learning data by a learning algorithm, and apredefined operation rule or an artificial intelligence model set toperform a desired characteristic (or, purpose) is made. Such learningmay be performed in a device wherein artificial intelligence isperformed itself, or performed through a separate server and/or system.As examples of learning algorithms, there are supervised learning,unsupervised learning, semi-supervised learning, or reinforcementlearning, but learning algorithms are not limited to the aforementionedexamples.

The processor 120 may load the artificial intelligence model compressionmodule 111 and the learning data reconstitution module 112 from anon-volatile memory to a volatile memory. The non-volatile memory refersto a memory that can maintain the stored information even if powersupply is stopped (e.g., a flash memory, a programmable read-only memory(PROM), a magnetoresistive random-access memory (MRAM), and a resistiveRAM (RRAM)). Meanwhile, the volatile memory refers to a memory thatneeds constant power supply for maintaining the stored information(e.g., a dynamic random-access memory (DRAM) and a static RAM (SRAM)).Also, loading means an operation of calling in data stored in thenon-volatile memory to the volatile memory and storing the data, so thatthe processor 120 can access the data. The non-volatile memory may beincluded in the processor 120, or it may be implemented as a separatecomponent from the processor 120 depending on embodiments.

The processor 120 may generate a compressed artificial intelligencemodel (a dedicated artificial intelligence model) by using theartificial intelligence model compression module 111 stored in thememory 110. Specifically, the processor 120 may generate dedicatedartificial intelligence models in various sizes in a generic-purposeartificial intelligence model by using the artificial intelligence modelcompression module 111. The generated dedicated artificial intelligencemodels may be artificial intelligence models having a smaller size thanthe generic-purpose artificial intelligence model, and the size of datarelated to a plurality of connections (weight value connections)included in the dedicated artificial intelligence models may be smallerthan the size of data related to connections among a plurality of nodesincluded in the generic-purpose artificial intelligence model.

The processor 120 may acquire a learning data set reconstituted by usingthe learning data reconstitution module 112 stored in the memory 110.

The processor 120 may generate dedicated artificial intelligence modelsin various sizes by repeating the processes of compressing and trainingan artificial intelligence model, and reconstituting a learning data setby using the artificial intelligence model compression module 111 andthe learning data reconstitution module 112.

In this regard, FIG. 4 is a flow chart of a method of compressing antraining an artificial intelligence model according to variousembodiments of the disclosure, and FIG. 5 is a diagram showing alearning data set reconstituted from learning data and a plurality ofdedicated artificial intelligence models generated from one artificialintelligence model according to an embodiment of the disclosure.

As described above in FIG. 2, in the memory 110, at least one trainedartificial intelligence model and learning data used for training theartificial intelligence model may be stored.

The processor 120 may select the at least one artificial intelligencemodel and the learning data corresponding to the artificial intelligencemodel stored in the memory 110 in operation S410. Here, the selectedartificial intelligence model may be a generic-purpose artificialintelligence model or a dedicated artificial intelligence model whichwas generated by being compressed from a generic-purpose artificialintelligence model.

The processor 120 may generate a dedicated artificial intelligence modelby using the selected artificial intelligence model.

For generating a dedicated artificial intelligence model, the processor120 may compress the selected artificial intelligence model, and trainthe compressed artificial intelligence model by using learning data inoperation S420.

More specifically, the processor 120 may determine a compressionparameter related to the size of a dedicated artificial intelligencemodel to be generated by using the artificial intelligence modelcompression module 111. The processor 120 may determine a layercompression parameter, a unit compression parameter, a compressionmethod parameter, and a compression rate parameter for each layerincluded in the selected artificial intelligence model. Based on thedetermined parameters, the processor 120 may reduce the size of datarelated to connections among a plurality of nodes included in theselected artificial intelligence model and compress the selectedartificial intelligence model. Then, the processor 120 may train theselected artificial intelligence model by using the learning data.

The processor 120 may compress and train the selected artificialintelligence model at least more than once.

For this, the processor 120 may train the selected artificialintelligence model, and then determine whether to additionally compressthe artificial intelligence model in operation S430. Specifically, theprocessor 120 may determine whether to additionally compress thecompressed artificial intelligence model based on the performance of thecompressed artificial intelligence model.

Specifically, the processor 120 may compress the selected artificialintelligence model by using the artificial intelligence modelcompression module 111, and in case the performance of the compressedartificial intelligence model compressed by using the selected learningdata exceeds a predetermined threshold value, the processor 120 mayrepetitively compress and train the selected artificial intelligencemodel until the performance of the artificial intelligence model becomeslower than or equal to the predetermined threshold value.

In case the performance of the artificial intelligence model becomeslower than or equal to the predetermined threshold value, that is, incase it is determined that recompression for the selected artificialintelligence model is not to be performed, the processor 120 maydetermine the compressed artificial intelligence model as a dedicatedartificial intelligence model for the learning data. Then, the processor120 may store information on the compressed artificial intelligencemodel (a dedicated artificial intelligence model) and information on thelearning data in the memory 110 in operation S440. Here, the informationon the compressed artificial intelligence model may include the size ofthe compressed artificial intelligence model and the compressionparameter. Also, the information on the learning data may include thefeature information of the learning data used for training thecompressed artificial intelligence model.

In this regard, referring to FIG. 5, the processor 120 may select thelearning data D₀ 510 and the artificial intelligence model N₀ 520 storedin the memory 110, and compress the artificial intelligence model N₀520, and then train the compressed artificial intelligence model byusing the learning data D₀ 510. Here, in case the performance of thecompressed artificial intelligence model exceeds the predeterminedthreshold value, the processor 120 may repetitively compress and trainthe selected artificial intelligence model until the performance of theartificial intelligence model becomes lower than or equal to thepredetermined threshold value. Then, the processor 120 may determinethat recompression for the selected artificial intelligence model N₀ forwhich the performance of the compressed artificial intelligence modelN₀′ becomes lower than or equal to the predetermined threshold valueshould no longer be performed, and stop recompression. In this case, theprocessor 120 may determine the compressed artificial intelligence modelN₀′ as a dedicated artificial intelligence model for the learning dataD₀. Then, the processor 120 may store information on the compressedartificial intelligence model (i.e., a dedicated artificial intelligencemodel) N₀′ 521 (information on the size of N₀′ and the compressionparameter) and information on the learning data in this regard (thefeature information of the learning data that trained N₀′) in the memory110.

Referring to FIG. 4, the processor 120 may store information on thecompressed artificial intelligence model and the learning data in thememory 110 in operation S440, and then reconstitute the learning data inoperation S450.

Specifically, the processor 120 may classify the learning data into aplurality of data sets by using the learning data reconstitution module112, and select some of the plurality of classified learning data setsbased on the predetermined rule. As the specific method forreconstituting the learning data was described above in FIG. 2,overlapping explanation will be omitted.

The processor 120 may determine whether the reconstituted learning datasatisfies a predetermined condition in operation S460. The predeterminedcondition may indicate the size of the learning data. That is, theprocessor 120 may determine whether the size of the reconstitutedlearning data is greater than or equal to a predetermined size.

Then, in case the reconstituted learning data satisfies thepredetermined condition in operation S460—Y, the processor 120 mayupdate the artificial intelligence model to be compressed in operationS470. For example, in case the size of the selected learning data set isgreater than or equal to the predetermined size, the processor 120 mayupdate the artificial intelligence model to be compressed. Here, theprocessor 120 may update one of the dedicated artificial intelligencemodels stored in the memory 110 to a compressed artificial intelligencemodel.

Then, the processor 120 may compress the updated artificial intelligencemodel (i.e., a dedicated artificial intelligence model), and train thecompressed artificial intelligence model by using the learning datareconstituted in the operation S450 in operation S420.

That is, in case the learning data set selected in the operation S450satisfies the predetermined condition, for example, in case the size ofthe selected learning data set is greater than or equal to thepredetermined value, the processor 120 may train the dedicatedartificial intelligence model by using the selected learning data set.

The processor 120 may repetitively compress the dedicated artificialintelligence model at least more than once, and train the compresseddedicated artificial intelligence model by using the selected learningdata set.

In this regard, referring to FIG. 5, the processor 120 may select onelearning data set D₁ 511 among a plurality of learning data setsincluded in the learning data D₀ according to the predetermined rule andreconstitute the learning data, and update the dedicated artificialintelligence model N₀′ 521 generated in the previous step to anartificial intelligence model to be compressed N₁ 521. The processor 120may repetitively compress the artificial intelligence model N₁ 521 atleast more than once and train the artificial intelligence modelcompressed from the artificial intelligence model N₁ 521 by using thelearning data set D₁ 511. The processor 120 may compress the compressedartificial intelligence model until the performance of the compressedartificial intelligence model compressed based on the artificialintelligence model N₁ 521 and trained with the data set D₁ becomes lowerthan or equal to the predetermined threshold value and generate adedicated artificial intelligence model N₁′ 522.

Afterwards, through the same process as the aforementioned process, theprocessor 120 may select one learning data set D₂ 512 among theplurality of learning data sets included in the learning data D₀according to the predetermined rule and reconstitute the learning data,and generate a dedicated artificial intelligence model N₂′.

As described above, based on the initial learning data D₀ 510 and theinitial network model N₀ 520, the processor 120 may generate dedicatedartificial intelligence models 521, 522, 523 in various sizes. Theprocessor 120 may compress the initial network model N₀ 520 by stages,and reconstitute the initial learning data D₀ by stages, and generatededicated artificial intelligence models 521, 522, 523 in various sizesby stages.

As the operations after generating a dedicated artificial intelligencemodel by compressing an artificial intelligence model are identical tothose in the aforementioned steps S440, S450, and S470, overlappingexplanation will be omitted.

As described above, the processor 120 may generate a plurality ofdedicated artificial intelligence models by compressing ageneric-purpose artificial intelligence model by stages andrepetitively, and training the compressed artificial intelligence modelwith a learning data set. The processor 120 may store information on thededicated artificial intelligence models generated by compressing ageneric-purpose artificial intelligence model by stages and repetitivelyand information on the learning data set in the memory 110.

FIG. 6 is a diagram for illustrating information on a dedicatedartificial intelligence model and information on a learning data setstored in the memory 110 according to an embodiment.

As a dedicated artificial intelligence model is generated by stages, theprocessor 120 may map information on a learning data set used fortraining the dedicated artificial intelligence model and map informationon the dedicated artificial intelligence model, and store theinformation by stages.

Here, the information on the learning data set may include featureinformation of the learning data set. Here, the feature information ofthe learning data set means the feature vectors of the learning dataused for training the dedicated artificial intelligence model, andspecifically, it may mean indicating elements having a specific patternor rule among a plurality of elements included in the learning data setas vectors. For example, in the case of learning data of a voicerecognition model, ‘a noisy environment,’ ‘a quiet environment without anoise,’ ‘a sound source in a far distance,’ ‘a sound source in a closedistance,’ ‘dictation wherein a lot of words are needed,’ ‘a voicecommand wherein a large amount of words are needed,’ etc. may be thefeature information of the learning data set.

The information on the dedicated artificial intelligence model may bethe size of the dedicated artificial intelligence model, and thecompression parameter of the dedicated artificial intelligence model.Depending on embodiments, the generated dedicated artificialintelligence model itself may be stored in the memory 110, as well asthe information on the dedicated artificial intelligence model.

As shown in FIG. 6, in case meta data regarding information on alearning data set and information on a dedicated artificial intelligencemodel is set as data description including a compression parameter anddata feature information, the processor 120 may store featureinformation of a learning data set used for training a dedicatedartificial intelligence model and a compression parameter used forgenerating a dedicated artificial intelligence model whenever adedicated artificial intelligence model is generated by stages.

For example, in case learning data that trained an artificialintelligence model compressed by applying a rank R0 to the SVD algorithmis Do, the processor 120 may map the compression parameter rank R0 andthe learning data feature information D₀ and store them in the memory110. Also, in case learning data that trained an artificial intelligencemodel compressed by applying a rank R1 to the SVD algorithm is D₁, theprocessor 120 may map the compression parameter rank R1 and the learningdata feature information D₁ and store them in the memory 110. Likewise,in case learning data that trained an artificial intelligence modelcompressed by applying a rank R2 to the SVD algorithm is D₂, theprocessor 120 may map the compression parameter rank R2 and the learningdata feature information D₂ and store them in the memory 110.

In case the degree of compression for an artificial intelligence modelis big (i.e., in case the value of the rank is small), the size of alearning data set may also become small. Accordingly, as shown in FIG.6, as the value of R becomes smaller, the amount of feature informationof data included in the data description also becomes smaller.

In FIG. 6, only the compression method parameter and the compressionrate parameter were shown as compression parameters, but the disclosureis not necessarily limited thereto, and it is obvious that the layercompression parameter or the unit compression parameter can be added andstored.

Returning to FIG. 2, the processor 120 may generate a dedicatedartificial intelligence model based on information on dedicatedartificial intelligence models in various sizes, and perform anoperation by using the generated dedicated artificial intelligencemodel.

Specifically, in case target data is input, the processor 120 may selectinformation on a dedicated artificial intelligence model for performingan operation for the target data among information on dedicatedartificial intelligence models in various sizes, and generate adedicated artificial intelligence model based on the selectedinformation on a dedicated artificial intelligence model. Here, thetarget data means input data for performing an operation by using atrained artificial intelligence model.

More specifically, in case the target data corresponds to one learningdata set is among a plurality of learning data sets included in thelearning data, the processor 120 may identify information on a dedicatedartificial intelligence model trained by using the learning data setcorresponding to the target data. Here, the feature that the target datacorresponds to a learning data set means that the feature information ofthe target data is identical to the feature information of the learningdata set. For example, in case the feature information of the targetdata is ‘voice data of a woman,’ and the feature information of alearning data set is ‘voice data of a woman,’ it can be deemed that thefeature information of the target data and the feature information ofthe learning data set correspond to each other.

For this, the processor 120 may determine the feature information of thetarget data, and determine the feature information of the plurality oflearning data sets included in the learning data.

Then, the processor 120 may generate a dedicated artificial intelligencemodel based on the identified information on a dedicated artificialintelligence model, and acquire an output value for the target data bymaking the target data an input value of the generated dedicatedartificial intelligence model.

FIG. 7A is a flow chart of a process of performing an operation by usinga dedicated artificial intelligence model according to an embodiment.

The processor 120 may receive target data in operation S710-a.Specifically, the processor 120 may receive target data from a user oran external electronic apparatus.

In case target data is input in operation S710-a, the processor 120 mayanalyze situation information for the target data in operation S720-a.Here, the situation information may indicate the feature information ofthe target data input into the electronic apparatus 100, and informationon hardware or software included in the electronic apparatus into whichthe target data is input when the target data is input.

For example, in case a user uttered ‘tell me about a route to OO bank’through the microphone of the electronic apparatus 100 (i.e., in case auser input target data), the processor 120 may analyze the voice signal,and analyze the feature information of the target data such as whether anoise is included in the user voice, whether the distance between theelectronic apparatus 100 and the user is close, the sex and age of theuser, etc.

Also, the processor 120 may analyze software information for operatingthe target data. For example, the processor 120 may identify an ID of avoice recognition model calling application, and identify the sizes ofwords necessary for dictation for a user's voice or a voice command. Forexample, in case the ID of the voice recognition model callingapplication corresponds to a user who mainly makes voice commands inshort sentences, the processor 120 may determine that only a smallamount of words are needed for dictation or a voice command. Incontrast, in case the ID of the voice recognition model callingapplication corresponds to a user who often makes voice commands andmakes various kinds of voice commands, the processor 120 may determinethat a large amount of words are needed for dictation or a voicecommand.

In addition, the processor 120 may analyze hardware information forprocessing the target data. For example, the processor 120 may analyzenetwork connection information such as WiFi, Bluetooth, etc. at the timewhen the target data was input, and determine whether a user is inindoors or outdoors. Also, the processor 120 may analyze sensinginformation such as a position sensor, an accelerometer sensor, a motionsensor, etc. included in the electronic apparatus 100, and determinewhether a user is in a stopped state or a moving state.

The processor 120 may determine a compression parameter of an artificialintelligence model based on the analyzed situation information inoperation S730-a. Specifically, the processor 120 may determine anoptimal compression parameter that can operate the target data.

The processor 120 may determine a compression parameter based oninformation on a learning data set and information on a dedicatedartificial intelligence model compressed by using the learning data setstored in the memory 110.

The processor 120 may identify information on a learning data setmatched to the situation information among the information on learningdata sets stored in the memory 110, and determine a compressionparameter related to the identified learning data set. The processor 120may determine a learning data set including the biggest amount ofinformation that coincides with the situation information of the targetdata among the plurality of learning data sets stored in the memory 110as a learning data set matched to the situation information, andidentify a compression parameter mapped to the determined learning dataset and stored in the memory 110. Depending on embodiments, in casethere are a plurality of learning data sets including the biggest amountof information that coincides with the situation information of thetarget data among the plurality of learning data sets stored in thememory 110, the processor 120 may determine the smallest learning dataset among the plurality of learning data sets as a learning data setmatched to the situation information, and identify a compressionparameter mapped to the determined learning data set.

For example, in case the situation information of the target data isanalyzed as ‘a distant sound source,’ ‘a clean environment without anoise,’ ‘a voice command using a small amount of words,’ and‘dictation,’ the processor 120 may identify a learning data set mappedto the situation information among the information on learning data setsstored in the memory 110. Referring to the information on learning datasets and information on dedicated artificial intelligence models shownin FIG. 6, the processor 120 may identify D₀ and D₁ as learning datasets including all the information included in the identified situationinformation among the information on learning data sets stored in thememory 110. The processor 120 may identify D₁ which is a smaller dataset between D₀ and D₁ as a data set matched to the situationinformation. Then, the processor 120 may identify a compressionparameter rank R1 mapped to the identified data set D₁ and stored.

The processor 120 may search for a dedicated artificial intelligencemodel corresponding to the compression parameter in operation S740-a.The processor 120 may identify a dedicated artificial intelligence modelcorresponding to the compression parameter among the plurality ofdedicated artificial intelligence models stored in the memory 110, andload the identified dedicated artificial intelligence model.

The loaded dedicated artificial intelligence model may be a compressedartificial intelligence model having a smaller size than thegeneric-purpose artificial intelligence model stored in the memory 110.As described above, the processor 120 may load a dedicated artificialintelligence model having a small size and may perform an operation, andthus an operation amount for the target data can be reduced, and theprocessing speed can be improved, and the resources (e.g., the memory,the CPU, the GPU, etc.) of the electronic apparatus 100 are not wasted,and thus usefulness of the resources can be enhanced.

The processor 120 may acquire an output value for the target data basedon the dedicated artificial intelligence model in operation S750-a.Specifically, the processor 120 may acquire output data for the targetdata by making the target data an input value for the dedicatedartificial intelligence model acquired in the operation S740. Then, theprocessor 120 may provide the acquired output data to the user throughan output interface (not shown) such as a display and a speaker.

The aforementioned embodiment relates to a case wherein a dedicatedartificial intelligence model is stored in the memory 110.

Depending on embodiments, in case a dedicated artificial intelligencemodel is not stored in the memory 110, the processor 120 may generate adedicated artificial intelligence model to which a compression parameteris reflected. In this case, the processor 120 may generate a dedicatedartificial intelligence model for a compression parameter by applying acompression parameter to the artificial intelligence model stored in thememory 110.

FIG. 7B is a flow chart of a process of performing an operation by usinga dedicated artificial intelligence model to which a compressionparameter is reflected according to an embodiment.

As the operations S710-b, S720-b, and S730-b in FIG. 7B are identical tothe operations S710-a, S720-a, and S730-a in FIG. 7A, explanation aboutoverlapping contents will be omitted.

The processor 120 may determine a compression parameter based on thesituation information for the target data input into the electronicapparatus 100 in operation S730-b, and then acquire an output value forthe target data by using a dedicated artificial intelligence model towhich the compression parameter is reflected in operation S740-b.

Specifically, the processor 120 may load a dedicated artificialintelligence model compressed by applying a compression algorithm to theartificial intelligence is model stored in the memory 110. Here, thecompression algorithm may be an algorithm wherein the compressionparameter determined in the operation S730-b was applied as an inputvalue.

For example, it is assumed that a matrix M in a size of m×n is stored inthe memory 110 as information on the generic-purpose artificialintelligence model. casein a case where the compression parameter isdetermined based on the situation information is R1, the processor 120may apply an SVD algorithm where the compression parameter R1 is used asan input value to the matrix M, and acquire a matrix U (a size of m×R1)and a matrix V* (a size of R1×n) which are compression matrices for thematrix M.

The processor 120 may acquire an output value for the target data byusing the matrix U and the matrix V* which are compression matrices. Theprocessor 120 may acquire an output value for the target data by makingthe target data as an input value of a multiplication matrix of thematrix U and the matrix V*.

As described above, the processor 120 may determine a compressionparameter based on the situation information for the target data, andgenerate an output value for the target data by using a dedicatedartificial intelligence model compressed by reflecting the determinedcompression parameter to the artificial intelligence model stored in thememory 110. In this case, the processor 120 may acquire an output valuefor an input value by performing an operation of applying a compressionalgorithm only once.

Embodiments where the electronic apparatus 100 performs an operation forthe target data are not limited to FIG. 7A and FIG. 7B. As anotherembodiment, the processor 120 may load the artificial intelligence modelstored in the memory 110, and generate a dedicated artificialintelligence model for the generic-purpose artificial intelligence modelby using the compression parameter determined in the operation S730-a orS730-b. In this case, the processor 120 may also generate a dedicatedartificial intelligence model by using an operation of applying acompression algorithm only once.

In FIG. 4 through FIG. 7, it was explained that one dedicated artificialintelligence model is generated in each step, but the disclosure is notnecessarily limited thereto.

FIG. 8 is a diagram showing a process of generating a plurality ofdedicated artificial intelligence models from an artificial intelligencemodel according to an embodiment.

As shown in FIG. 8, the processor 120 may generate a plurality ofdedicated artificial intelligence models in each step. Specifically, theprocessor 120 may generate a plurality of dedicated artificialintelligence models by selecting different learning data sets in eachstep.

For example, the processor 120 may generate a dedicated artificialintelligence model N₁ by compressing an initial artificial intelligencemodel N₀ by using the artificial intelligence model compression module111, and training the compressed artificial intelligence model by usinginitial learning data D₀.

Then, the processor 120 may classify a plurality of learning data setsfrom the learning data D₀ by using the learning data reconstitutionmodule 112, and select different learning data sets among the classifiedlearning data sets and generate different dedicated artificialintelligence models. For example, the processor 120 may select alearning data set D₁₋₁ from the learning data D₀, and repetitively trainthe artificial intelligence model generated by repetitively compressingthe dedicated artificial intelligence model N₁ by using the learningdata set D₁₋₁ and generate a dedicated artificial intelligence modelN₂₋₁. Likewise, the processor 120 may select a learning data set D₁₋₂from the learning data D₀, and generate a dedicated artificialintelligence model N₂₋₂ trained by using the learning data set D₁₋₂, andselect a learning data set D₁₋₃ from the learning data D₀, and generatea dedicated artificial intelligence model N₂₋₃ trained by using thelearning data set D₁₋₃.

The processor 120 may select one of the at least one dedicatedartificial intelligence models generated in each step, and generate adedicated artificial intelligence model for the selected artificialintelligence model. For example, the processor 120 may select thededicated artificial intelligence model N₂₋₂ which is one of theplurality of dedicated artificial intelligence models N₂₋₁, N₂₋₂, andN₂₋₃ generated in the stage 2, and update the selected dedicatedartificial intelligence model N₂₋₂ as an artificial intelligence modelto be compressed.

The processor 120 may select different learning data sets D₂₋₁ and D₂₋₂from the learning data set D₁₋₂ that trained the dedicated artificialintelligence model N₂₋₂. The processor 120 may repetitively train anartificial intelligence model generated by repetitively compressing thededicated artificial intelligence model N₁₋₂ by using the selectedlearning data set D₂₋₁ and generate a dedicated artificial intelligencemodel N₃₋₁. Likewise, the processor 120 may generate a dedicatedartificial intelligence model N₃₋₂ trained by using the learning dataset D₂₋₂ selected from the learning data set D₁₋₂.

As described above in FIG. 4 through FIG. 8, the processor 120 may traina dedicated artificial intelligence model generated in each step byusing a learning data set selected from the learning data according to apredetermined rule.

FIG. 9 through FIG. 11 are diagrams of a process that selects a learningdata set from learning data according to a predetermined rule, andtrains a dedicated artificial intelligence model by using the selectedlearning data set according to an embodiment.

FIG. 9 is a diagram showing the electronic apparatus 100 training adedicated artificial intelligence model by using target data input intothe electronic apparatus 100 according to an embodiment. Specifically,FIG. 9A is a diagram showing an electronic apparatus 100 training adedicated artificial intelligence model where the electronic apparatus100 is a user terminal apparatus like a speaker, and FIG. 9B is adiagram showing an electronic apparatus training a dedicated artificialintelligence model where the electronic apparatus 100 is a server.

The processor 120 may receive target data from a user. For example, incase a trained artificial intelligence model is a voice recognitionmodel, the processor 120 may receive a voice command like “Turn the airconditioner” from a user as target data. Then, the processor 120 mayperform voice recognition for the voice command “Turn the airconditioner” by making the target data as an input value of the voicerecognition model, and provide a response such as “The air conditionerwas turned on” to the user as an output value therefor.

The processor 120 may generate a dedicated artificial intelligence modelfor the target data, and train the generated dedicated artificialintelligence model.

For this, the processor 120 may classify the learning data into aplurality of learning data sets based on the feature information of thelearning data. Here, the feature information of the learning data meansindicating elements which are meaningful as they have a specific patternor rule among a plurality of elements included in the learning data asvectors.

Specifically, the processor 120 may determine the feature information ofthe learning data by using the learning data reconstitution module 112,and classify the learning data into a plurality of learning data setsbased on the determined feature information of the learning data.

More specifically, the processor 120 may acquire vector values with thefeature information of the learning data by using the learning datareconstitution module 112, and classify the learning data into aplurality of learning data sets based on the distribution of the vectorvalues.

For example, in case the learning data is natural language utterancevoice data, the processor 120 may classify the learning data into anutterance without a noise uttered in a quiet environment, an utterancewhich was uttered in a quiet environment but for which the distancebetween the sound source and the apparatus is far, an utterance whereina noise other than the utterance is mixed, etc. based on the vectorvalues of the learning data. Alternatively, the processor 120 mayclassify the learning data into a woman's utterance, a man's utterance,a child's utterance, a teenager's utterance, utterances for each region,etc. Or, the processor 120 may classify the learning data intosmartphone learning data, TV learning data, learning data of an airconditioner, etc. based on the feature vector values of the learningdata.

As another example, in a case where the learning data is objectrecognition data, the processor 120 may classify the learning data intoa person (a man, a woman, a child, a crowd), an animal (a dog, a cat, alion, a tiger, etc.), an object (a natural object, an artificial object,etc.), and the like based on the feature vector values of the learningdata.

The processor 120 may identify a learning data set corresponding to thetarget data among the plurality of classified learning data sets.

For this, the processor 120 may extract the feature information of thetarget data received from the user.

The processor 120 may compare the extracted feature information of thetarget data and the feature information of the plurality of learningdata sets, and select a learning data set which is identical or similarto the feature information of the target data among the plurality oflearning data sets.

Then, the processor 120 may train an artificial intelligence model withthe selected learning data set. Specifically, the processor 120 mayrepetitively compress the generic-purpose artificial intelligence model(or the dedicated artificial intelligence model) prestored in the memory110, and repetitively train the compressed artificial intelligence modelwith the selected learning data set. As a result, the processor 120 maygenerate a new dedicated artificial intelligence model, and train thegenerated dedicated artificial intelligence model with the selectedlearning data set.

For example, in case a user made an utterance such as “Turn on the airconditioner” in an environment wherein noises like a TV sound exist, theprocessor 120 may extract feature information such as a control commandof the air conditioner and existence of some noises as the featureinformation of the target data “Turn on the air conditioner.” Theprocessor 120 may select a combination of ‘a learning data set for anair conditioner’ and ‘a learning data set in an environment wherein somenoises exist’ as learning data sets identical or similar to the featureinformation of the target data among the plurality of learning datasets.

The processor 120 may repetitively compress the generic-purposeartificial intelligence model prestored in the memory 110 by stages, andtrain the compressed artificial intelligence model with the combinationof ‘a learning data set for an air conditioner’ and ‘a learning data setin an environment wherein some noises exist,’ and generate a dedicatedartificial intelligence model, and ultimately, the processor 120 maytrain the generated dedicated artificial intelligence model with thecombination of ‘a learning data set for an air conditioner’ and ‘alearning data set in an environment wherein some noises exist.’

The processor 120 may compress the dedicated artificial intelligencemodel prestored in the memory 110 instead of the generic-purposeartificial intelligence model by stages and train the compressedartificial intelligence model with the combination of the learning datasets. For example, the processor 120 may compress an airconditioner-dedicated artificial intelligence model trained by thelearning data set for an air conditioner by stages, and train thecompressed artificial intelligence model by using the combination of ‘alearning data set for an air conditioner’ and ‘a learning data set in anenvironment wherein some noises exist.’ As a result, the processor 120may generate a new dedicated artificial intelligence model trained withthe combination of ‘a learning data set for an air conditioner’ and ‘alearning data set in an environment wherein some noises exist’ and trainthe dedicated artificial intelligence model.

As shown in FIG. 9B, the electronic apparatus 100 may be implemented asa server. In this case, the electronic apparatus 100 may be connectedwith a user terminal apparatus 200 such as a speaker or a TV, and asmartphone and perform communication. Classification by the electronicapparatus 100 of the learning data into a plurality of learning datasets based on the feature information of the learning data beingidentical to what is shown in FIG. 9A above, and thus explanation inthis regard will be omitted.

In a case where a user inputs target data into the user terminalapparatus 200, the user terminal apparatus 200 may transmit the targetdata to the electronic apparatus 100. The processor 120 that receivedthe target data from the user terminal apparatus 200 may generate adedicated artificial intelligence model based on the target data, andtrain the generated dedicated artificial intelligence model.

Specifically, the processor 120 may select a learning data setcorresponding to the target data among the plurality of learning datasets, and train the dedicated artificial intelligence model generated bycompressing an artificial intelligence model by using the selectedlearning data set.

The processor 120 may output a result value for the target data bymaking the target data an input of the generated dedicated artificialintelligence model, and transmit the output result value to the userterminal apparatus 200.

FIG. 10 is a diagram showing a process of training a dedicatedartificial intelligence model based on test data according to anembodiment.

The artificial intelligence model 521 in FIG. 10 may be a dedicatedartificial intelligence model generated by compressing thegeneric-purpose artificial intelligence model 520. Here, the dedicatedartificial intelligence model 521 may be an artificial intelligencemodel trained by using the learning data D₀.

After generating the dedicated artificial intelligence model, theprocessor 120 may perform a test for the dedicated artificialintelligence model 521 by using test data T₀ 1010. Here, the test dataindicates data which has common feature information with the learningdata, but which is different data from the learning data.

As the test data has common feature information with the learning data,but is different from the learning data, the dedicated artificialintelligence model 521 may output a target value for the test data, oroutput a value close to a target value, or output a different value froma target value.

The processor 120 may classify the test data into a plurality of testdata sets by using the learning data reconstitution module 112. Forexample, the processor 120 may classify the test data into a test dataset T′₀ 1011 that outputs a target value or outputs a value close to atarget value or a test data set T″₀ 1012 that outputs a different valuefrom a target value.

The processor 120 may select a test data set from the test data based onthe test result. Specifically, the processor 120 may select the testdata set T′₀ 1011 that output a target value or output a value close toa target value.

The processor 120 may identify a learning data set corresponding to thetest data set T′₀ 1011 selected from the learning data D₀ 1010.Specifically, the processor 120 may select a learning data set includingcommon feature information with the test data set T′₀ 1011 selected fromthe learning data D₀ 1010.

For example, assuming that the dedicated artificial intelligence model521 corresponds to a machine translation artificial intelligence modeland the learning data is test data in various lengths, the test data mayalso include text data in various lengths like the learning data. If, asa result of testing the dedicated artificial intelligence model with thetest data, the dedicated artificial intelligence model outputs thetarget value or a value close to the target value for test dataincluding information on 15 or fewer words, but outputs a differentvalue from the target value for test data including information on wordsexceeding 15, the processor 120 may classify the test data T₀ 1010 intothe test data set T′₀ 1011 including information on 15 or fewer wordsand the test data set T″₀ 1012 including information on words exceeding15, and identify a learning data set corresponding to the test data setT′₀ 1011 including information on 15 or fewer words. That is, theprocessor 120 may select a learning data set including 15 or fewer wordsamong the learning data sets.

The processor 120 may train a dedicated artificial intelligence model byusing the identified learning data set. Here, the processor 120 maygenerate a dedicated artificial intelligence model 522 by repetitivelycompressing the dedicated artificial intelligence model 521, and trainthe generated dedicated artificial intelligence model 522 by using theidentified learning data set.

FIG. 11 is a diagram of a process of training a dedicated artificialintelligence model based on a user's input according to an embodiment.

The processor 120 may receive an input for setting learning data from auser through various interfaces included in the electronic apparatus100.

The processor 120 may control a display to display a user interface (UI)for receiving a user input for setting learning data.

The screens 1110, 1120, and 1130 in FIG. 11 indicate screens displayedon an electronic apparatus including the display such as a TV, asmartphone, a tablet PC, a PC, and a laptop PC. The processor 120 maydisplay a screen 1110 including a UI for inputting a job that a userwants, a screen 1120 including a UI for inputting an apparatus that auser will use, and a screen 1130 including a UI for inputting asurrounding environment of a user. Other than the above, the processor120 may display screens including various UIs such as a UI for inputtinguser information such as the age and sex of a user depending onembodiments.

In the case of receiving learning data setting information from a userthrough a UI displayed on the display, the processor 120 may select alearning data set corresponding to the data setting information from thelearning data, and train a dedicated artificial intelligence model byusing the selected learning data set.

For example, in a case where a user input setting information of‘performing a voice command through Bixby by using a TV in a little nosyenvironment’ through UIs displayed on the screens 1110, 1120, and 1130,the processor 120 may select a learning data set for a voice command, alearning data set operating in a TV apparatus, and a learning data setfor a voice command in a space where some noises exist from the learningdata, and train the dedicated artificial intelligence model by using acombination of the selected learning data sets.

FIG. 11 shows that a plurality of learning data sets are selectedthrough a plurality of setting information inputs, but, in otherembodiments, learning data sets can be selected through one settinginformation input.

Also, in FIG. 11, a UI for a user to select one of a plurality of menuitems is shown, but a UI for a user to directly input data informationmay be displayed depending on embodiments.

FIG. 11 shows a user input being received through a UI displayed on thedisplay, but the disclosure is not limited thereto.

According to another embodiment, the processor 120 may set learning datathrough a voice command through the microphone. For example, in case auser uttered “I want to recognize an animal from the image,” theprocessor 120 may select a learning data set for image recognition and alearning data set recognizing an animal from the learning data, andtrain the dedicated artificial intelligence model by using a combinationof the selected learning data sets.

FIG. 12 is a flow chart of a method for controlling an electronicapparatus according to various embodiments.

First, based on a generic-purpose artificial intelligence model trainedby using learning data, a dedicated artificial intelligence model havinga smaller size than the generic-purpose artificial intelligence modelmay be generated in operation S1210. Here, the generic-purposeartificial intelligence model may be a generic-purpose artificialintelligence model trained at the electronic apparatus 100 or anartificial intelligence model trained at an external apparatus such as aserver and stored in the electronic apparatus 100.

The dedicated artificial intelligence model may be an artificialintelligence model compressed from the generic-purpose artificialintelligence model, and the size of data related to connections among aplurality of nodes (connections of weight values) included in thededicated artificial intelligence model may be smaller than the size ofdata related to connections among a plurality of nodes included in thegeneric-purpose artificial intelligence model. For example, the numberof the connections among the plurality of nodes included in thededicated artificial intelligence model may be smaller than the numberof the connections among the plurality of nodes included in thegeneric-purpose artificial intelligence model, or the bit numbers of theconnections among the plurality of nodes included in the dedicatedartificial intelligence model may be smaller than the bit numbers of theconnections among the plurality of nodes included in the generic-purposeartificial intelligence model.

Then, a compression parameter related to the dedicated artificialintelligence is model may be determined, and a dedicated artificialintelligence model may be generated by reducing the size of the datarelated to the number of the connections among the plurality of nodesincluded in the generic-purpose artificial intelligence model based onthe determined compression parameter.

Then, the dedicated artificial intelligence model may be trained byusing a learning data set selected from the learning data according to apredetermined rule in operation S1220.

As an example, the dedicated artificial intelligence model may betrained based on target data. The target data means input data forperforming an operation by using a trained artificial intelligencemodel.

Specifically, the electronic apparatus may classify the learning datainto a plurality of learning data sets based on feature information ofthe learning data, and train the dedicated artificial intelligence modelwith a learning data set corresponding to the target data among theplurality of classified learning data sets. Here, the featureinformation of the learning data means feature vectors of the learningdata, and specifically, it may mean indicating elements having aspecific pattern or rule among a plurality of elements included in thelearning data as vectors.

As another example, the dedicated artificial intelligence model may betrained based on test data. Here, the test data indicates data which hascommon feature information with the learning data, but which isdifferent data from the learning data.

Specifically, the electronic apparatus may test the generic-purposeartificial intelligence model or the dedicated artificial intelligencemodel generated based on the generic-purpose artificial intelligencemodel by using the test data.

A test data set may be selected from the test data based on the testresult. For example, a test data set that output a target value or avalue close to a target value may be selected in the test data based onthe test result.

Then, a learning data set corresponding to the test data set selectedfrom the learning data may be identified, and the dedicated artificialintelligence model may be trained by using the identified learning dataset.

As another example, data setting information may be received from auser, and the dedicated artificial intelligence model may be trainedbased on the received data setting information.

The electronic apparatus may display a UI for receiving user datasetting information, and receive a user input through the displayed UI.

In the case of receiving data setting information from a user, alearning data set corresponding to the data setting information may beselected from the learning data, and the dedicated artificialintelligence model may be trained by using the selected learning dataset.

A learning data set included in the learning data may be selectedaccording to the aforementioned predetermined rule, and it may bedetermined whether the selected learning data set satisfies apredetermined condition. Then, in case the selected learning data setsatisfies the predetermined condition, the dedicated artificialintelligence model may be trained by using the selected learning dataset.

For example, it may be determined whether the size of the selectedlearning data set is greater than or equal to a predetermined value, andin case the size of the selected learning data set is greater than orequal to the predetermined value, the dedicated artificial intelligencemodel may be trained.

The performance of the dedicated artificial intelligence model may bedetermined by testing the trained dedicated artificial intelligencemodel.

If, as a result of testing the dedicated artificial intelligence model,the performance of the dedicated artificial intelligence model isgreater than or equal to a first threshold value and smaller than orequal to a second threshold value, information on the dedicatedartificial intelligence model and information on the learning data setthat the dedicated artificial intelligence model learned may be stored.

A dedicated artificial intelligence model may be generated based on thegeneric-purpose artificial intelligence model, and another dedicatedartificial intelligence model may be generated based on the generateddedicated artificial intelligence model.

Specifically, a dedicated artificial intelligence model may be generatedby compressing the generic-purpose artificial intelligence model, andthe dedicated artificial intelligence model may be trained by using alearning data set included in the learning data. Here, in a case wherethe performance of the dedicated artificial intelligence model isgreater than or equal to the predetermined value as a result of testingthe trained dedicated artificial intelligence model, another dedicatedartificial intelligence model may be generated based on the dedicatedartificial intelligence model.

The electronic apparatus 100 may receive target data. In a case wherethe target data corresponds to one learning data set among the pluralityof learning data sets included in the learning data in operationS1230—Y, an output value for the target data may be acquired by makingthe target data an input value of the dedicated artificial intelligencemodel in operation S1240. The dedicated artificial intelligence model inthis case may be a dedicated artificial intelligence model trained withthe learning data set corresponding to the target data.

Specifically, feature information of the target data may be determined,and feature information of the learning data set may be determined, andin case the feature information of the target data corresponds to thefeature information of the learning data set, an output value for thetarget data may be acquired by making the target data an input value ofthe dedicated artificial intelligence model.

As another example, in a case where information on a learning data setand information on a dedicated artificial intelligence model trainedwith the learning data set are stored in the electronic apparatus,information on a learning data set corresponding to the featureinformation of the target data among the information on the plurality oflearning data sets stored in the electronic apparatus may be identified,and a dedicated artificial intelligence model may be generated based onthe information on the dedicated artificial intelligence model trainedby using the identified learning data set. Then, an output value for thetarget data may be acquired by making the target data an input value ofthe generated dedicated artificial intelligence model.

In the above description, the various operations described as beingperformed through the electronic apparatus 100 or an external apparatusof the electronic apparatus 100 may be performed through one or moreelectronic apparatuses in the form of a controlling method or anoperating method of the electronic apparatus. For example, the featuresof generating a dedicated artificial intelligence model, training thegenerated dedicated artificial intelligence model, and determining acompression parameter for the dedicated artificial intelligence modelmay be performed at an external apparatus, and at the electronicapparatus 100, only an operation for target data may be performed byusing information on a dedicated artificial intelligence model andinformation on learning data.

The various embodiments described above may be implemented in arecording medium that can be read by a computer or an apparatus similarto a computer, by using software, hardware, or a combination thereof.

According to implementation by hardware, embodiments may be implementedby using at least one of application specific integrated circuits(ASICs), digital signal processors (DSPs), digital signal processingdevices (DSPDs), programmable logic devices (PLDs), field programmablegate arrays (FPGAs), processors, controllers, micro-controllers,microprocessors, or an electronic unit for performing various functions.

In some cases, the embodiments may be implemented as the processoritself. According to implementation by software, the embodiments may beimplemented as separate software modules. Each of the software modulesmay perform one or more functions and operations described in thisspecification.

Computer instructions for executing the processing operations accordingto the various embodiments may be stored in a non-transitory computerreadable medium. Such computer instructions stored in a non-transitorycomputer readable medium may make the processing operations according tothe various embodiments performed by a specific machine, when they areexecuted by a processor.

A non-transitory computer readable medium refers to a medium that storesdata semi-permanently, and is readable by machines, but not a mediumthat stores data for a short moment such as a register, a cache, and amemory. Specifically, the aforementioned various applications orprograms may be provided while being stored in a non-transitory computerreadable medium such as a CD, a DVD, a hard disk, a blue-ray disk, aUSB, a memory card, a ROM and the like.

Also, while preferred embodiments have been shown and described, thedisclosure is not limited to the aforementioned specific embodiments,and it is apparent that various modifications may be made by thosehaving ordinary skill in the technical field to which the disclosurebelongs, without departing from the gist of the disclosure as claimed bythe appended claims. Also, it is intended that such modifications arenot to be interpreted independently from the technical idea or prospectof the disclosure.

1. A method for controlling an electronic apparatus, the methodcomprising: selecting a generic-purpose artificial intelligence model;generating a compressed artificial intelligence model based on theselected generic-purpose artificial intelligence model; and generating adedicated artificial intelligence model based on the generatedcompressed artificial intelligence model, wherein the generating acompressed artificial intelligence model comprises: acquiring a rank ofa singular value decomposition (SVD) algorithm based on a compressionrate, compressing and training the selected generic-purpose artificialintelligence model based on the acquired rank and converting the modelinto the compressed artificial intelligence model, determining theperformance of the converted compressed artificial intelligence modelbased on a predetermined first threshold value, and based on theperformance of the converted compressed artificial intelligence modelbeing lower than the predetermined first threshold value, generating thededicated artificial intelligence model.
 2. The controlling method ofclaim 1, wherein the generating a compressed artificial intelligencemodel comprises: based on the performance of the converted compressedartificial intelligence model being higher than or equal to thepredetermined first threshold value, repeating the generating acompressed artificial intelligence model.
 3. The controlling method ofclaim 1, wherein the generating the dedicated artificial intelligencemodel comprises: retraining the compressed artificial intelligence modelbased on a predetermined learning data set.
 4. The controlling method ofclaim 3, wherein the generating the dedicated artificial intelligencemodel comprises: determining the performance of the retrained compressedartificial intelligence model in relation to a predetermined secondthreshold value; and based on the performance of the retrainedcompressed artificial intelligence model being higher than or equal tothe predetermined second threshold value, additionally compressing theretrained compressed artificial intelligence model and generating thededicated artificial intelligence model.
 5. The controlling method ofclaim 3, wherein the generating the dedicated artificial intelligencemodel comprises: based on feature information of first learning datathat trained the selected generic-purpose artificial intelligence model,classifying the first learning data into a plurality of learning datasets, and reconstituting at least one data set among the plurality oflearning data sets as the predetermined learning data set.
 6. Thecontrolling method of claim 5, wherein the predetermined learning dataset comprises at least one data set compressed to correspond to a targetdata input as an input value among the plurality of learning data sets.7. The controlling method of claim 3, wherein the generating acompressed artificial intelligence model comprises: determining theperformance of the converted compressed artificial intelligence modelbased on test data, and the generating a dedicated artificialintelligence model comprises: classifying the test data into a pluralityof learning data sets, and reconstituting at least one data set amongthe plurality of learning data sets as the predetermined learning dataset.
 8. The controlling method of claim 7, wherein the test dataincludes test data that output a result within a predetermined rangebased on a target value.
 9. The controlling method of claim 3, whereinthe generating the dedicated artificial intelligence model comprises:based on receiving data setting information from a user, identifying alearning data set corresponding to the data setting information from afirst learning data that trained the selected generic-purpose artificialintelligence model, and reconstituting the identified learning data setas the predetermined learning data set.
 10. An electronic apparatuscomprising: a memory storing first learning data and a generic-purposeartificial intelligence model trained by the first learning data; and aprocessor, wherein the processor is configured to: select the trainedgeneric-purpose artificial intelligence model, acquire a rank of asingular value decomposition (SVD) algorithm based on a compressionrate, compress and train the selected generic-purpose artificialintelligence model based on the acquired rank and convert the model intothe compressed artificial intelligence model, determine the performanceof the converted compressed artificial intelligence model based on apredetermined first threshold value, and based on the performance of theconverted compressed artificial intelligence model being lower than thepredetermined first threshold value, generate a dedicated artificialintelligence model.
 11. The electronic apparatus of claim 10, whereinthe processor is configured to: based on the performance of theconverted compressed artificial intelligence model being higher than orequal to the predetermined first threshold value, repeat the convertinginto the compressed artificial intelligence model.
 12. The electronicapparatus of claim 10, wherein the processor is further configured to:retrain the compressed artificial intelligence model based on apredetermined learning data set.
 13. The electronic apparatus of claim12, wherein the processor is further configured to: determine theperformance of the retrained compressed artificial intelligence model inrelation to a predetermined second threshold value; and based on theperformance of the retrained compressed artificial intelligence modelbeing higher than or equal to the predetermined second threshold value,additionally compress the retrained compressed artificial intelligencemodel and generate the dedicated artificial intelligence model.
 14. Theelectronic apparatus of claim 12, wherein the processor is furtherconfigured to: based on feature information of the first learning datathat trained the selected generic-purpose artificial intelligence model,classify the first learning data into a plurality of learning data sets,and reconstitute at least one data set among the plurality of learningdata sets as the predetermined learning data set.
 15. The electronicapparatus of claim 12, wherein the processor is further configured to:determine the performance of the compressed artificial intelligencemodel based on test data; classify the test data into a plurality oflearning data sets; and reconstitute at least one data set among theplurality of learning data sets as the predetermined learning data set.